#!/bin/sh

pushd $(dirname $0)

# Install vim-full
sudo apt-get install vim

# Vim configurations
if [ ! -d ~/.vim/colors ]; then
  mkdir ~/.vim/colors
fi
cp *.vim ~/.vim/colors/
sudo cat vimrc.a > ~/.vimrc

# Install ctags
sudo apt-get install exuberant-ctags

# Install taglist
if [ ! -f taglist_45.zip ]; then
  wget http://www.vim.org/scripts/download_script.php?src_id=7701 -O taglist_45.zip
fi
if [ ! -d ~/.vim ]; then
  mkdir ~/.vim
fi
unzip -o  taglist_45.zip -d ~/.vim
rm taglist_45.zip

# Install cscope
sudo apt-get install cscope
sudo apt-get install cscope-indexer
wget http://cscope.sourceforge.net/cscope_maps.vim -O cscope_maps.vim
if [ ! -d ~/.vim/plugin ]; then
  mkdir ~/.vim/plugin
fi
cat cscope_maps.vim > ~/.vim/plugin/cscope_maps.vim  
rm cscope_maps.vim

popd

